Enabling full preprocessing

You should enable full preprocessing if your code heavily uses non-syntactic macros and you don't want to configure the Parser.
To enable full preprocessing:

In any open SNiFF+ tool, choose Tools > Project Editor to open the Project Editor.
In the Project Tree, checkmark the projects for which you want to enable full preprocessing.
Check out the PDFs of the checkmarked projects.
Choose Project > Attributes of Checkmarked Projects....
Select the Parser node.

In the Group Project Attributes dialog

- Select the Parser node.

In the Parser View

Select the Preprocess Source Code before Parsing check box.
Select the check box to the right of the above, this will make the attribute applicable to all Projects in the list on the right.
Press the Set for All button.
Select the Directives node.

In the Directives view

Specify preprocessor directives.

| Note
| The syntax used by cpp applies to this field ( -Dmacro-spec or -Umacro-spec directives separated by blanks).

Specifying the "-L" option for selective preprocessing
If you have an include file that defines problematic macros, you can just process this file using the "-L" option.

- Enter

-L<include_file> in the Preprocessor Directive(s) field.
The preprocessor loads and expands include_file only. No other include files are processed.

Specifying multiple "-L" options

Enter

-L"foo.h" -L<include/bar.h> in the Preprocessor Directive(s) field.
This includes and expands the macros defined in the two files foo.h and include/ bar.h in all files of the project as if the files were included with the normal #include statement. No other include files are processed, even if the source files contain #include statements.
To apply the settings in the Preprocessor Directive(s) field to all checkmarked projects, select the check box to its right.
Press the Set For All button.
The attributes now apply to all the projects checkmarked in the Project Tree.
Press the OK button to close the Group Project Attributes dialog.
In the Project Editor

Save all modified projects.
In order for full processing to take effect, you must also reparse the projects that you just modified. In the Project Tree, make sure the projects for which you've enabled full preprocessing are still checkmarked.
Choose Project > Force Reparse.

Include path used by preprocessor
SNiff+ supplies the same include directives used by your compiler to your preprocessor.
Speeding up preprocessing by caching
When preprocessing is enabled, parsing takes longer since all include files are parsed and macros are expanded. To speed up this process, SNiFF+ has an intelligent include file caching mechanism that only loads and parses an include file once.
Advantages of the caching mechanism

- Whenever an include file is referenced a second time, the symbols and macros are taken directly from the cache.
- After a file has been successfully preprocessed and parsed, its symbol information is stored persistently.
- Like non-preprocessed files, preprocessed files are only reparsed when they are modified.

| Note
| Once a file has been preprocessed and its symbolic information stored to disk, SNiFF+ loads it just as quickly as a non-preprocessed file's symbolic information.